<div class="isi">

    <script>
        <?php 
        $lib_rupiah = new Format_rupiah();
        for($x=1; $x<=$jml_mitra; $x++){
            echo "
                $(document).ready(function() {
                    oTable = $('#laporan_".$x."').dataTable({
                        \"bJQueryUI\": true,
                        \"sPaginationType\": \"full_numbers\"
                    });
                } );    
            ";
        }
        ?>
    </script>   
    
    


        <div id="tabs">
            <ul>
                <?php
                    $n=1;
                    $img_update=$this->lib_button->edit_icon();  
                    foreach ($list_mitra as $dt_mitra){
                        echo "<li><a href='#tabs-".$n."'>$dt_mitra->nama_mitra</a></li>";
                        $n++;
                    }
                ?>
            </ul>
            
            <?php
                $x=1;
                foreach ($list_mitra as $dt_mitra){
                    echo "<div id='tabs-".$x."' style='padding: 10px 2px 2px 2px;'>";
                        echo "<table id='laporan_".$x."' class='display'>";
                            echo "<thead>";
                                echo "<tr>";
                                    echo "<th width='5%'>No</th>";
                                    echo "<th>Nama Provinsi</th>";
                                    echo "<th>Nama Kota</th>";
                                    echo "<th>Biaya Kirim</th>";
                                    echo "<th width='5%'>Tindakan</th>";
                                 echo "</tr>";         
                            echo "</thead>";
                            echo "<tbody>";
                            $n=1;
                            foreach ($list_tarif as $dt_bkirim){
                                if($dt_bkirim->id_mitra==$dt_mitra->id){
                                    $link_edit=anchor('admin_tarif_kirim/update/'.$dt_bkirim->id, $img_update);  
                                    echo "<tr>";
                                        echo "<td>$n</td>";
                                        echo "<td>$dt_bkirim->nama_provinsi</td>";
                                        echo "<td>$dt_bkirim->nama_kota</td>";
                                        echo "<td align=right>".$lib_rupiah->rupiah($dt_bkirim->harga_kirim)." </td>";
                                        echo "<td>$link_edit</th>";
                                    echo "</tr>";  
                                    $n++;
//                                    
                                }
                            }
                            echo "</tbody>";
                        echo "</table>"; 
                    echo "</div>";      
                    $x=$x+1;
                }                
            ?>
            


        </div>        


    <div class="clear"></div>
</div>